package com.itbbfx.mapper;

import com.itbbfx.entity.Baoque;
import com.itbbfx.entity.Drugstore;
import com.itbbfx.entity.Huishou;
import com.itbbfx.entity.Ypharmacy;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface PharmacyMapper extends Mapper<Ypharmacy> {
    Ypharmacy queryPharmacy(@Param("ypharmacy") Ypharmacy ypharmacy);

    int updatePharmacy(@Param("y") Ypharmacy y);

    int addPharmacy(@Param("ypharmacy") Ypharmacy ypharmacy);

    //回收给药房
    int delpharymacy(Ypharmacy ypharmacy);

    //回收表
    int addhuishou(Huishou huishou);

    //查询回收表
    List<Huishou> selhuishou(Huishou huishou);

    //删除回收表
    int delhuishou(Huishou huishou);

    //    查询全部
    List<Ypharmacy> selectall();

    //查询药房药品
    List<Ypharmacy> selpharmacy(Ypharmacy ypharmacy);

    //添加药品到报缺表
    int addbaoque(Baoque baoque);

    //查询报缺表药品名称是否已存在
    int selbaoqueName(Baoque baoque);

    //修改数量
    int upbaoquenum(Baoque baoque);

    //定时任务
    int cleanExpiredpharmacy(Ypharmacy ypharmacy);
}